package com.newtouch.xcd.cms.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.newtouch.xcd.cms.entity.Benefit;
import com.newtouch.xcd.cms.mapper.BenefitMapper;
import com.newtouch.xcd.cms.service.BenefitService;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 * 利益分配表 服务实现类
 * </p>
 *
 * @author dongyuefeng
 * @since 2020-06-11
 */
@Component
@Service
public class BenefitServiceImpl extends ServiceImpl<BenefitMapper, Benefit> implements BenefitService {

    /**
     * 根据合同ID查找数据
     *
     * @param contractId 合同编号ID
     * @return
     */
    @Override
    public List<Benefit> queryByContractId(String contractId) {

        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("contract_id", contractId);

        return this.list(queryWrapper);
    }
}
